#include "junix.h"

struct A
{
	int i;
	char b[1];
};

struct B
{
	int i;
	char b;
};

int main(int argc, char **argv)
{
	printf("sizeof struct A:%d\n",sizeof(struct A));
	printf("sizeof struct B:%d\n",sizeof(struct B));

	printf("offsetof(struct A, b):%d\n", 
			offsetof(struct A, b));
	struct A *pa = alloca(offsetof(struct A,b) +10);
	strcpy(pa->b,"hello,world!\n");
	printf("%s",pa->b);

	exit(0);
}

